package com.netty.protobuf;



import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.CharsetUtil;

public class NettyClientHandler extends ChannelInboundHandlerAdapter {
    @Override
    public void channelActive(ChannelHandlerContext ctx) {
        System.out.println("Client:"+ctx);
        BookMessage.Book message=BookMessage.Book.newBuilder().setId(1).setName("java入门到精通").build();
        ctx.writeAndFlush(message);
    }
}

